# Maintainer: David Sugar <tychosoft@gmail.com>
# Contributor: David Sugar <tychosoft@gmail.com>
pkgname=moderncli
pkgver=0.8.1
pkgrel=0
pkgdesc="Modern C++17 header-only library of includes"
url="https://www.tychosoft.com/tychosoft/moderncli/wiki"
arch="noarch"
license="MIT"
makedepends="cmake fmt-dev openssl-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="https://www.tychosoft.com/api/packages/tychosoft/generic/moderncli/$pkgver/moderncli-$pkgver.tar.gz"

build() {
	cmake \
		-DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=Release .
	make
}

check() {
	make test
}

package() {
	DESTDIR="$pkgdir" make install
	install -Dm644 LICENSE.md "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.md
	install -Dm644 README.md "$pkgdir"/usr/share/doc/$pkgname/README.md
	install -Dm644 FEATURES.md "$pkgdir"/usr/share/doc/$pkgname/FEATURES.md
}

sha512sums="d38e8e8abc2854aa3524885ebd4bf22b19711d94b2238e4f7db0765dd8abc2dafd0e7fed81534c3676ede2746d960f7a977019a43739a91d1a2cdaf6531fc1e3 moderncli-0.8.1.tar.gz
"
